<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 如果需要使用 Thymeleaf 的语法,则需要添加一个名称空间 -->
    <meta charset="UTF-8" xmlns:th="http://www.thymeleaf.org">
    <base th:href="@{/}">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>admin</title>
</head>
<body>
    <h2 th:text="${msg}"></h2>
    <input type="text" value="原始值" th:value="${msg}">
    <a th:href="${url}">百度首页</a>
    <h2 th:text="${application.applicationMsg}"></h2>
    <hr>
    上下文路径:<span th:text="@{/}"></span>
    <hr>
    <a href="first?id=101&name=tom">访问 FirstServlet01</a>
    <a th:href="@{/first(id=102,name='jack')}">访问 FirstServlet02</a><br>
    <hr>
    请求参数: <p th:text="${param.id}"></p>
            <p th:text="${param.name}"></p>
            <p th:text="${param.hobby}"></p>
            <p th:text="${param.hobby[0]}"></p>
            <p th:text="${param.hobby[1]}"></p>
            <p th:text="${param.hobby[2]}"></p>
    <hr>
    内置对象:
    <p th:text="${#request.getMethod()}"></p>
    <p th:text="${#request.getContextPath()}"></p>
    <p th:text="@{/}"></p>
    <p th:text="${#request.getParameter('id')}"></p>
    <p th:text="${param.id}"></p>
    <p th:text="${#servletContext.getAttribute('applicationMsg')}"></p>
    <p th:text="${application.applicationMsg}"></p>
    <hr>
    公共内置对象:
    <p th:text="${#strings.length(msg)}"></p>
    <p th:text="${#strings.length(application.applicationMsg)}"></p>
    <p th:text="${#strings.isEmpty(application.applicationMsg)}"></p>
    <p th:text="${#strings.contains(application.applicationMsg,'应用域')}"></p>
    <p th:text="${#arrays.length(names)}"></p>
    <p th:text="${#arrays.contains(names,'java')}"></p>
    <p th:text="${#arrays.isEmpty(names)}"></p>
    <p th:text="${#lists.isEmpty(list)}"></p>
    <p th:text="${#lists.size(list)}"></p>
    <p th:text='${#lists.contains(list,"a")}'></p>
    <hr>
</body>
</html>
